package com.sc.nft.entity.dto;

import com.sc.nft.entity.SaasTask;
import com.sc.nft.enums.SaasTaskMeetConditionsLocationEnum;
import com.sc.nft.enums.SaasTaskTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
@Data
public class SaasTaskBurialPointDTO {
    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "任务类型")
    private SaasTaskTypeEnum taskType;

    @ApiModelProperty(value = "任务进度")
    private BigDecimal schedule;

    @ApiModelProperty(value = "主动邀请人数(这里意味着是邀请者的意思)")
    private Integer voluntarySum;

    @ApiModelProperty(value = "命中条件id")
    private Long conditionId;

    @ApiModelProperty(value = "订单id,用来处理ip商品")
    private Long orderId;


    @ApiModelProperty(value = "符合用户条件的任务.但是需要进一步的在去查询.")
    private List<SaasTask> valid;

    private SaasTaskMeetConditionsLocationEnum saasTaskMeetConditionsLocationEnum;


    public  SaasTaskBurialPointDTO  wallet(Long userId,SaasTaskTypeEnum saasTaskTypeEnum,BigDecimal schedule,Integer voluntarySum,Long conditionId){
        SaasTaskBurialPointDTO saasTaskBurialPointDTO = new SaasTaskBurialPointDTO();
        saasTaskBurialPointDTO.setUserId(userId);
        saasTaskBurialPointDTO.setTaskType(saasTaskTypeEnum);
        saasTaskBurialPointDTO.setSchedule(schedule);
        saasTaskBurialPointDTO.setVoluntarySum(voluntarySum);
        saasTaskBurialPointDTO.setConditionId(conditionId);
        return saasTaskBurialPointDTO;
    }

    public  SaasTaskBurialPointDTO  wallet(Long userId,SaasTaskTypeEnum saasTaskTypeEnum,BigDecimal schedule,Integer voluntarySum,Long conditionId,Long orderId){
        SaasTaskBurialPointDTO saasTaskBurialPointDTO = wallet(userId,saasTaskTypeEnum,schedule,voluntarySum,conditionId);
        saasTaskBurialPointDTO.setOrderId(orderId);
        return saasTaskBurialPointDTO;
    }

    public  SaasTaskBurialPointDTO  wallet(Long userId, SaasTaskTypeEnum saasTaskTypeEnum, BigDecimal schedule, Integer voluntarySum, Long conditionId, Long orderId, SaasTaskMeetConditionsLocationEnum saasTaskMeetConditionsLocationEnum){
        SaasTaskBurialPointDTO saasTaskBurialPointDTO = wallet(userId,saasTaskTypeEnum,schedule,voluntarySum,conditionId,orderId);
        saasTaskBurialPointDTO.setSaasTaskMeetConditionsLocationEnum(saasTaskMeetConditionsLocationEnum);
        return saasTaskBurialPointDTO;
    }
}
